-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add decay-time, recovery-time, and owned-decay-time #864
Add decay-time, recovery-time, and owned-decay-time #864
Conversation
…trol points. Signed-off-by: mrcookie <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When implementing recovery & decay, incremental
has to be mutually-exclusive with them, and code-wise incremental needs to go away, since it's equivalent to instant decay & recovery.
Visit http://docs.oc.tc/modules/control_points for the 1.9+ PGM documentation about how to properly havee incremental, recovery & decay attributes play together:
There's also the parsing code from 1.9+ PGM regarding this topic: https://github.com/OvercastNetwork/ProjectAres/blob/master/PGM/src/main/java/tc/oc/pgm/controlpoint/ControlPointParser.java#L80
Also the dominate code for reference: https://github.com/OvercastNetwork/ProjectAres/blob/master/PGM/src/main/java/tc/oc/pgm/controlpoint/ControlPoint.java#L383
…GM. Changed everything from units of time to rate. Signed-off-by: mrcookie <[email protected]>
Everything was changed to rates rather than units of time. Also, the functionality was changed to mimic that of 1.9 PGM. Here is a quick run-down of what each attribute defines:
Also, here is an explanation of what rate implies: if time to capture is 10 seconds, and the owned-decay-rate is 2, then it will decay to neutral in 5 seconds. Also worth noting, most of the code here was not my own, I copied a lot of it from the 1.9 PGM codebase with some minor adjustments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's looking pretty good, make sure you test this with multiple existing maps as well as modified xmls to test the new features and make sure they all both work as intended, and fit the needs of the original issue
core/src/main/java/tc/oc/pgm/controlpoint/ControlPointParser.java
Outdated
Show resolved
Hide resolved
core/src/main/java/tc/oc/pgm/controlpoint/ControlPointParser.java
Outdated
Show resolved
Hide resolved
Signed-off-by: mrcookie <[email protected]>
Update: just added Pablo's changes, and tested on lots of cp maps. Existing maps work correctly and the new features work correctly as well 😄. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tracking this down and working with Pablo, looks ready to roll! 🚀
Addresses #803
Edit: below is outdated, check comment for up-to-date description
I added decay-time, recovery-time, and owned-decay-time attributes to control points. All of these attributes are in units of time. So, for example, if
recover-time="5s"
, assuming a captured point that is 50% uncaptured, it will take 2.5 seconds to recover to fully captured. 99% uncaptured will take ~5s.Another thing to note is that if an equal number of defenders and attackers(non-dominating team) are standing on the point, the point will decay/recover/owned-decay.
Signed-off-by: mrcookie